package boot.controller;

import boot.entity.Student;
import boot.service.StudentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author HLF
 * @date 2022/4/5 19:37
 */
@RestController
@RequestMapping("/student")
public class StudentController {
    @Resource
    private StudentService studentService;

    @GetMapping("/getAll")
    public List<Student> getAll() {
        return studentService.getAllStudents();
    }
}
